/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uoc.tdp.pac4.beans;

import java.util.ArrayList;

/**
 *
 * @author andres
 */
public class Presup {
   
    public ArrayList<Float> imports;
    public float total;

    public Presup() {
        
        imports = new ArrayList();
        total = 0;
        
    }
    
    
    public void addImport(Float importe, int unitats){
    
        imports.add(importe*unitats);
        total = 0;
   
       
        for(int i=0;i< imports.size(); i++) {
            total = total+(float)imports.get(i);
        }
        
    }
    
}